def num(n):
    count=0
    while n!=1:
        if n%2==0:
            n=n/2
            count=count+1
        else:
            n=3*n+1
            count=count+1
    print(count)
n=int(input('请输入数据'))
if n<=0:
    print("错误")
num(n)

